﻿using System.ComponentModel.DataAnnotations.Schema;
namespace Simple.Repository.Models.System;

/// <summary>
/// 菜单表
/// </summary>
[Table("QHSE_SYS_MENU")]
public class QHSESysMenu : EntityBase
{
    /// <summary>
    /// 父级Id
    /// </summary>
    [Column("PARENT_ID")]
    [MaxLength(32)]
    public string ParentId { get; set; }

    [Column("MENU_ID")]
    [MaxLength(32)]
    [Key]
    public string Id { get; set; }
    /// <summary>
    /// 编码
    /// </summary>
    [MaxLength(64)]
    [Column("MENU_CODE")]
    public string? Code { get; set; }

    /// <summary>
    /// 名称
    /// </summary>
    [MaxLength(64)]
    [Column("MENU_NAME")]
    public string? Name { get; set; } = "";

    /// <summary>
    /// 盐
    /// </summary>
    [MaxLength(32)]
    [Column("MENU_SALT")]
    public string? Salt { get; set; }
    /// <summary>
    /// URL
    /// </summary>
    [MaxLength(256)]
    [Column("MENU_URL")]
    public string? Url { get; set; }

    /// <summary>
    /// 菜单类型（1-目录，2-菜单，3-按钮）
    /// </summary>
    [Column("MENU_TYPE")]
    public QHSEMenuType Type { get; set; }

    /// <summary>
    /// 0显示，1隐藏
    /// </summary>
    [Column("DATA_STATUS")]
    public DataStatus Status { get; set; } = DataStatus.Display;

    /// <summary>
    /// 排序
    /// </summary>
    [Column("DATA_SORT")]
    public int Sort { get; set; } = 99;

    [Column("CREATE_TIME")]
    public DateTime CreateTime { get; set; } =DateTime.Now;
    [Column("UPDATE_TIME")]
    public DateTime UpdateTime { get; set; } = DateTime.Now;
}
